package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.time.LocalDateTime;
import java.sql.Blob;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author demo
 * @since 2025-02-28
 */
public class Pet implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 宠物编号
     */
    @TableField("pet_no")
    private Integer petNo;

    /**
     * 宠物状态, 200表示健康, 500表示疾病
     */
    private Integer status;

    /**
     * 描述
     */
    private String content;

    /**
     * 小动物图片二进制数据
     */
    @TableField("pet_image")
    @JsonIgnore
    private byte[] petImage;

    /**
     * 图片类型: image/png/image/jpeg
     */
    @TableField("image_type")
    private String imageType;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 动物类别：4，小狗；6，小猫
     */
    @TableField("pet_type")
    private Integer petType;

    /**
     * 动物性别：1，male；6，female
     */
    private Integer sex;
    /**
     * 昵称
     */
    @TableField("pet_name")
    private String petName;

    @TableField("apply_status")
    private Integer applyStatus;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Integer getPetNo() {
        return petNo;
    }

    public void setPetNo(Integer petNo) {
        this.petNo = petNo;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    public byte[] getPetImage() {
        return petImage;
    }

    public void setPetImage(byte[] petImage) {
        this.petImage = petImage;
    }
    public String getImageType() {
        return imageType;
    }

    public void setImageType(String imageType) {
        this.imageType = imageType;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Integer getPetType() {
        return petType;
    }

    public void setPetType(Integer petType) {
        this.petType = petType;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getPetName() {
        return petName;
    }

    public void setPetName(String petName) {
        this.petName = petName;
    }

    public Integer getApplyStatus() { return applyStatus; }
    public void setApplyStatus(Integer applyStatus) { this.applyStatus = applyStatus; }

    @Override
    public String toString() {
        return "Pet{" +
            "id=" + id +
            ", petNo=" + petNo +
            ", status=" + status +
            ", content=" + content +
            ", petImage=" + petImage +
            ", imageType=" + imageType +
            ", createTime=" + createTime +
            ", petType=" + petType +
            ", sex=" + sex +
            ", petName=" + petName +
            ", applyStatus=" + applyStatus +
        "}";
    }
}
